package com.jml.代理模式.五期.service.cglib.调试代理类;

/**
 * @ClassName Test0001
 * @Author 蚂蚁课堂余胜军 QQ644064779 www.mayikt.com
 * @Version V1.0
 **/
public class Test0001 {
    public static void main(String[] args) {
//        System.setProperty(DebuggingClassWriter.DEBUG_LOCATION_PROPERTY, "D:\\code");
//        Enhancer enhancer = new Enhancer();
//        enhancer.setSuperclass(MemberServiceImpl.class);
//        enhancer.setCallback(new CglibMethodInterceptor());
//        // 创建代理代理对象
//        MemberService memberService = (MemberService) enhancer.create();
//        memberService.addMember("jml");
        MemberServiceImpl$$EnhancerByCGLIB$$600aa7a2 memberServiceImpl=
                new MemberServiceImpl$$EnhancerByCGLIB$$600aa7a2();
        memberServiceImpl.setCallbacks(new CglibMethodInterceptor());
        memberServiceImpl.addMember("jml");
    }
}
